package com.huiruan.controller.mini;

import com.huiruan.entity.MiniUser;
import com.huiruan.entity.SysUser;
import com.huiruan.service.MiniUserService;
import com.huiruan.utils.JwtUtil;
import com.huiruan.utils.Result;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 小程序用户控制器
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/miniUser")
public class MiniUserController {
    private final MiniUserService miniUserService;
    /**
     * 获取所有小程序用户
     */
    @GetMapping("/getUser")
    public Result listUserInfo() {
        MiniUser miniUser = JwtUtil.getMiniUserInfo();
        return Result.success(miniUser);
    }
}
